Skip to content

Conversation

@SeonJeongk
Copy link
Contributor

@SeonJeongk SeonJeongk commented Apr 3, 2025

📝 작업 내용


  1. ViewModel 내 Context 모두 제거
    • 사진을 업로드하는 모든 화면에 쓰이는 ViewModel에서 이미지 파일 변환을 위해 사용한 Context를 제거했습니다.
      • 식단 기록, 회원 가입
    • 파일 변환은 UI 단에서 처리하고, 변환된 이미지 파일만 ViewModel로 전달하도록 구조를 변경했습니다.

  1. 약관 노션 링크 수정
    • 이전된 노션 페이지 링크로 약관 URL을 교체했습니다.

  1. 식단 기록 중단 다이얼로그 버튼 동작 수정
    • 취소확인 버튼의 동작이 반대로 매핑되어있는 문제를 발견해 수정했습니다.

📸 실행 화면

  • UI 변경사항 없습니다! 아래는 정상 작동 확인용 영상들입니다

약관

default.mp4

트레이너 회원가입

default.mp4

트레이니 회원가입

default.mp4

식단 기록

default.mp4

🙆🏻 리뷰 요청 사항

👀 레퍼런스

@SeonJeongk SeonJeongk added ♻️ Refactor 코드 리팩토링 🛠️ Fix 버그 발생 보고 및 해결 🌻 선정 김씨 집안 막내 김선정 labels Apr 3, 2025
@SeonJeongk SeonJeongk requested a review from hoyahozz April 3, 2025 10:34
@SeonJeongk SeonJeongk self-assigned this Apr 3, 2025
@SeonJeongk SeonJeongk changed the title [TNT-272][TNT-275] ViewModel 내 Context 모두 제거 및 약관 링크 수정 [TNT-272][TNT-275] ViewModel 내 Context 제거 및 약관 링크 수정 Apr 3, 2025
@hoyahozz hoyahozz changed the base branch from develop to refactor/TNT-269 April 10, 2025 01:18
Copy link
Member

@hoyahozz hoyahozz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생하셨어요 ㅎㅎ 코멘트 확인 부탁드립니다! :)

Comment on lines +4 to +5
const val PRIVACY_POLICY_URL = "https://ymkim97.notion.site/1bcd727836a3813e9f5dd60ed9620612"
const val TERMS_OF_SERVICE_URL = "https://ymkim97.notion.site/1bcd727836a381c08c7bdf4d70c3639b"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

오 꼼꼼하게 체크해주셨군요 ㅎㅎ 👍

val state by viewModel.uiState.collectAsStateWithLifecycle()
val dateFormatter = remember { DateFormatter() }

var imageFile by rememberSaveable { mutableStateOf<File?>(null) }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이미지가 선택될 때마다 File 형태로 만들어야 할까요 ?_?

저장 시, 즉 한 번만 File 형태로 만드는건 어떨까요?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

파일 변환 시 걸리는 시간을 고려해 미리 변환해둔건데, 다시 생각해보니 굳이 그럴 필요는 없을 것 같네요..!
저장 버튼 클릭 시, File 형태로 만들도록 수정하겠습니다!

Comment on lines 51 to 59
LaunchedEffect(completeState.value) {
if (completeState.value) {
val imageFile = withContext(Dispatchers.IO) {
state.image?.convertToAllowedImageFormat(context)
}
onNextClick(imageFile)
completeState.value = false
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

completeState 라는 중간 다리를 한 번 더 거쳐야 할까? 라는 생각이 쬐끔 드네요!

rememberCoroutineScope 를 활용해 onClick 발생 시 파일로 바로 변환 후 넘겨주는 방식은 어떨까요?_?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

넵 수정했습니다!

@SeonJeongk SeonJeongk changed the base branch from refactor/TNT-269 to develop May 6, 2025 05:54
@SeonJeongk SeonJeongk requested a review from hoyahozz May 6, 2025 05:55
Copy link
Member

@hoyahozz hoyahozz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍👍👍

@SeonJeongk SeonJeongk merged commit 7ac6db0 into develop May 6, 2025
4 checks passed
@SeonJeongk SeonJeongk deleted the refactor/TNT-272 branch May 6, 2025 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

♻️ Refactor 코드 리팩토링 🌻 선정 김씨 집안 막내 김선정 🛠️ Fix 버그 발생 보고 및 해결

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[TNT-272] ViewModel 내 Context 모두 제거 [TNT-275] 약관 노션 링크 수정

3 participants